package com.ruoyi.system.controller.front;

import java.util.List;

import com.ruoyi.system.domain.SafetyPublicityInfo;
import com.ruoyi.system.domain.StudentInfo;
import com.ruoyi.system.domain.front.CaseHistoryFront;
import com.ruoyi.system.domain.front.PublicitySelect;
import com.ruoyi.system.mapper.front.SafetyPublicFrontMapper;
import com.ruoyi.system.service.front.ISafetyPublicFrontService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.CaseInfo;
import com.ruoyi.system.service.ICaseInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 案件信息Controller
 *
 * @author ruoyi
 * @date 2021-04-07
 */
@RestController
@RequestMapping("/system/front/safetypublicfront")
public class SafetyPublicFrontController extends BaseController{
    @Autowired
    private ISafetyPublicFrontService safetyPublicFrontService;

    /**
     * 查询安全宣传列表
     */
    @GetMapping("/selectpublictime")
    public TableDataInfo selectpublictime(PublicitySelect publicitySelect)
    {
        logput(publicitySelect,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectpublictime(publicitySelect));
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }

    /**
     * 获取安全宣传详细信息
     */
    //@PreAuthorize("@ss.hasPermi('system:publicityinfo:detailed')")
    @PostMapping("/publicityinfodetailed")
    public TableDataInfo detailed(@RequestBody SafetyPublicityInfo safetyPublicityInfo)
    {
        logput(safetyPublicityInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectSafetyPublicityInfoDetailed(safetyPublicityInfo));
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }

    /**
     * 查询安全宣传分类
     */
    @GetMapping("/selectpublicitytype")
    public TableDataInfo selectpublicitytype()
    {
        logput(null,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectpublicitytype());
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }
}


